# constructProj/jsonConfig.py
# -*-coding:utf-8 -*-
# @file       jsonConfig.py
# @author     yearnext
# @version    1.0.0
# @date       2021-11-19
# @brief      constructProj jsonConfig.py component
from PyQt5 import QtCore
from PyQt5.QtWidgets import QComboBox
from PyQt5.QtCore import pyqtSignal


class uComboBoxWidget(QComboBox):
    clicked = pyqtSignal()  # 创建一个信号

    def __init__(self, parent=None):
        super().__init__(parent)

    # 重写鼠标单击事件
    def mousePressEvent(self, QMouseEvent):
        if QMouseEvent.button() == QtCore.Qt.LeftButton:
            self.clicked.emit()
            # print('trigger mouse left button event')

        super(uComboBoxWidget, self).mousePressEvent(QMouseEvent)
